package com.yanyi.music.dao;

import com.yanyi.music.domain.Consumer;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 前端用户
 */
@Repository
public interface ConsumerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Consumer record);

    int insertSelective(Consumer record);

    Consumer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Consumer record);

    int updateByPrimaryKey(Consumer record);

    List<Consumer> findAll(Map<String,Object> map);
    /**
     * 验证密码
     */
    int verifyPassword(@Param("username") String username, String password);

    /**
     * 根据账号查询
     */
    Consumer getByUsername(String username);
}